[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 randbwr()               Random Block Write

 #include   <dos.h>

 int         randbwr(fcbptr,reccnt);
 struct fcb  *fcbptr;                    Pointer to structure
 int         reccnt;                     Number of records to be written

    randbwr() uses DOS system call 0x28 to write 'reccnt' number of
    records using the open FCB pointed to by 'fcbptr'.  The records are
    written into memory at the current disk transfer address and are
    written from the disk record indicated in the 'random record' field
    of the FCB. If 'reccnt' is 0, the file is truncated to the value in
    the 'random record' field. Because the 'random record' field is
    advanced by the number of records written, it gives the total number
    of records actually written.

       Returns:     The following values, depending on the result of the
                    read operation:

                    0    All records written
                    1    Not enough disk space to write the records.  No
                         records are written.
                    2    Writing all records would wrap around
                         address 0xFFFF (as many records as possible
                         were written)

   Portability:     MS-DOS only.


See Also: randbrd()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson